import Vue from 'vue'
import VueRouter from 'vue-router'
import Recommend from '../views/Recommend.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Recommend',
    component: Recommend
  },
  {
    path: '/hot',
    name: 'HotMusic',
    component:()=>import('../views/HotMusic')
  },
  {
    path: '/hot/:num',
    name: 'HotMusic',
    component:()=>import('../views/HotMusic')
  },
  {
    path: '/playlist/:musicId',
    name: 'ListDetails',
    component:()=>import('../views/ListDetails')
  },
  {
    path: '/search',
    component:()=>import('../views/Search'),
  },

]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
